<include file="Public:header" /><!-- header -->

<div class="wrap nosubsub">
  <div id="icon-{$ur_here.action}" class="icon32"><br /></div><h2>{$ur_here.text}</h2>
  <br class="clear" />
  <div id="col-container">
    <div id="col-right">
      <div class="col-wrap">
        <form id="posts-filter" action="{:U('Admin-Metas/batch')}" method="post">
		<input type="hidden" name="type" value="category">
          <div class="tablenav top">
            <div class="alignleft actions">
              <select name='action'>
                <option value='-1' selected='selected'>批量操作</option>
                <option value='delete'>删除</option>
				<option value='refresh'>刷新</option>
              </select>
              <input type="submit" name="" id="doaction" class="button-secondary action" value="应用"  />
            </div>
            <div class='tablenav-pages'><span class="displaying-num">{$total} 个项目</span></div>
            <br class="clear" />
          </div>
          <table class="wp-list-table widefat fixed tags" cellspacing="0">
            <thead>
              <tr>
                <th scope='col' id='cb' class='manage-column column-cb check-column'  style=""><input type="checkbox" /></th>
                <th scope='col' id='name' class='manage-column column-name'  style=""><span>名称</span></th>
                <th scope='col' id='description' class='manage-column column-description'  style=""><span>描述</span></th>
                <th scope='col' id='slug' class='manage-column column-slug'  style=""><span>别名</span></th>
                <th scope='col' id='posts' class='manage-column column-posts num'  style=""><span>文章</span></th>
              </tr>
            </thead>
            <tbody id="the-list" class='list:tag'>
              <volist name="category" id="vo">
                <tr id="tag-{$vo.metaid}" class="alternate">
                  <th scope="row" class="check-column"><if condition='$vo.metaid neq 1'>
                      <input type="checkbox" name="metaid[]" value="{$vo.metaid}" />
                    </if></th>
                  <td class='name column-name'><strong><a class="row-title" href="{:U('Admin-Metas/edit',array('type'=>'category','metaid'=>$vo['metaid']))}" title="编辑“{$vo.name}”" style="margin-left:{$vo.level}em">{$vo.name}</a></strong><br />
                    <div class="row-actions"><span class='edit'><a href="{:U('Admin-Metas/edit',array('type'=>'category','metaid'=>$vo['metaid']))}">编辑</a> | </span>
                      <if condition='$vo.metaid neq 1'><span class='delete'><a class='delete-tag' href="{:U('Admin-Metas/delete',array('type'=>'category','metaid'=>$vo['metaid']))}" onclick="return confirm('您将永久删除所选项目。');">删除</a> | </span></if>
                      <span class='view'><a href="###">查看</a></span></div>
                    <div class="hidden" id="inline_{$vo.metaid}">
                      <div class="name">{$vo.name}</div>
                      <div class="slug">{$vo.slug}</div>
                      <div class="parent">{$vo.parent}</div>
                    </div></td>
                  <td class='description column-description'>{$vo.description}</td>
                  <td class='slug column-slug'>{$vo.slug}</td>
                  <td class='posts column-posts'><a href="{:U('Admin-Posts/index',array('type'=>'category','metaid'=>$vo['metaid']))}">{$vo.count}</a></td>
                </tr>
              </volist>
            </tbody>
          </table>
          <br class="clear" />
        </form>
        <div class="form-wrap">
          <p><strong>注意：</strong><br />
            删除分类目录不会把该分类目录下的文章一并删除。文章会被归入 <strong>{$default_category}</strong> 分类目录。</p>
        </div>
      </div>
    </div>
    <!-- /col-right -->
    <div id="col-left">
      <div class="col-wrap">
        <div class="form-wrap">
          <h3>添加新分类目录</h3>
          <form id="addtag" method="post" action="{:U('Admin-Metas/category')}" class="validate">
            <input type="hidden" name="type" value="category">
            <input type="hidden" name="action" value="category">
            <div class="form-field form-required">
              <label for="tag-name">名称</label>
              <input name="name" id="tag-name" type="text" value="" size="40" aria-required="true" />
              <p>这将是它在站点上显示的名字。</p>
            </div>
            <div class="form-field">
              <label for="tag-slug">别名</label>
              <input name="slug" id="tag-slug" type="text" value="" size="40" />
              <p>“别名”是对于 URL 友好的一个别称。它通常为小写并且只能包含字母，数字和连字符（-）。</p>
            </div>
            <div class="form-field">
              <label for="parent">父级</label>
              <select name='parent' id='parent' class='postform' >
                <option value='0'>无</option>
                {$select}
              </select>
              <p>分类目录，和标签不同，它可以有层级关系。您可以有一个音乐的分类目录，在这个目录下，您可以创建流行或者古典的子目录。完全自由。</p>
            </div>
            <div class="form-field form-required">
              <label for="tag-name">排序</label>
              <input name="order" id="tag-name" type="text" value="50" size="40" aria-required="true" />
              <p>这将是它在分类列表上显示的顺序，通常是一个数字。</p>
            </div>
            <div class="form-field">
              <label for="tag-description">描述</label>
              <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
              <p>描述只会在一部分主题中显示。</p>
            </div>
            <p class="submit">
              <input type="submit" name="submit" id="submit" class="button" value="添加新分类目录"  />
            </p>
          </form>
        </div>
      </div>
    </div>
    <!-- /col-left -->
  </div>
  <!-- /col-container -->
</div>
<!-- /wrap -->
<load href="../Public/js/wp-ajax-response.js" />
<include file="Public:footer" /><!-- footer -->
